import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router'

@Component({
  selector: 'eq-algorithm-edit',
  templateUrl: './algorithm-edit.component.html'
})
export class AlgorithmEditComponent implements OnInit {
  title = 'eq-algorithm-edit';
  id: number;
  code: string = '000001'

  constructor(
    private activatedRoute: ActivatedRoute
  ) {}

  ngOnInit() {
    this.activatedRoute.params.subscribe((params: any) => {
      this.id = this.activatedRoute.snapshot.params['id'];
      this.code = this.activatedRoute.snapshot.params['code'];
      console.log(this.id);
      console.log(this.code);
    });
  }
}
